﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DataAccess_Layer;
using System.Data;
namespace Business_Layer
{
    public class History_BUS
    {
        public static int insert(History newBonus)
        {
            return History_DAC.insert(newBonus);
        }
        public static bool insertDetail(HistoryDetail newBonus)
        {
            return History_DAC.insertHistoryDetail(newBonus);
        }
        public static DataTable getAll(int ID_Customer)
        {
            return History_DAC.getAll(ID_Customer).ToDataTable<History>();
        }
        public static DataTable getAllDetail(int ID_LichSu)
        {
            return History_DAC.getAllDetail(ID_LichSu).ToDataTable<HistoryDetail>();
        }
        History_DAC hd = new History_DAC();
        //public IList<HistoryDetail> GetListAll()
        //{
        //    try
        //    {
        //        return hd.GetList();
        //    }
        //    catch
        //    {
        //        throw new Exception("Không lấy được danh sách khách hàng!");
        //    }
        //}
        public List<HistoryDetail> getAll()
        {
            List<HistoryDetail> list = History_DAC.getAllWithName();
            return list;
        }
        
    }
}
